import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    // 令牌
    token: "",
    // 用于刷新的令牌
    refesh_roken: "",
  },
  mutations: {
    // 修改令牌
    changeToken(state, data) {
      state.token = data;
    },
    // 修改用于刷新的令牌
    changeRefeshToken(state, data) {
      state.refesh_roken = data;
    },
  },
  actions: {},
  modules: {},
});
